home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / GraphicsWrap / Source / GraphicView.h < prev    next >
Text File  |  1991-09-18  |  3KB  |  81 lines

  1. /* GraphicView.h -- front end to an intelligent bitmap environment designed
  2.  *    for bitmap oriented computer graphics (15-462).
  3.  *
  4.  * Written By: Bill Bumgarner (Friday Software & Consulting)
  5.  *             <wb1j+@andrew.cmu.edu>
  6.  *             414 S.Craig, #119
  7.  *             Pittsburgh, PA. 15213
  8.  *             412-268-5378
  9.  *
  10.  * You are free to use, abuse, and distribute this source code in any
  11.  * form under the following conditions:
  12.  *    - The author makes no gurantee as to the validity, stability, or
  13.  * correctedness of the contained code.
  14.  *    - You send any neat code additions to the above email address
  15.  * (I'm not looking for any of the basic stuff-- I just want neat
  16.  *  designs, cool images, and other such stuff that falls in the realm
  17.  * of extraordinary).  And if you can't send the code, for whatever reason,
  18.  * send a description of the project.  (If it is interesting to me, I
  19.  * am quite willing to offer my assistance-- whether it be beta
  20.  * testing or just answering questions).
  21.  *    - Either the info panel stays as is or else it contains the message:
  22.  *      "Built on GraphicsWrapper by bbum".  Not an ego thing-- I just
  23.  *      want to have an idea of who is using this for what.
  24.  *
  25.  * If you have any questions about the code (or anything else), email
  26.  * them to the above address and I will try to be as helpful as possible.
  27.  */
  28.  
  29. #import <appkit/View.h>
  30.  
  31. @interface GraphicView:View
  32. {
  33.   id bitmap;    // pointer to the NXBitmapGraphicRep object
  34.   id foreWell;  // NXColorWell containing the current foreground color
  35.   id backWell;  // NXColorWell containing the current background color
  36.   id foreSlide; // Slider that contains the gray value of the foreground
  37.   id backSlide; // Slider that contains the gray value of the background
  38.   id infoPanel; // id of the infoPanel object
  39.  
  40.   id toolPanel;
  41.   id toolBtn;
  42.   id toolStatus;
  43. }
  44. // initializes the view and allocates/initializes the bitmap object
  45. - initFrame:(NXRect *) aRect;
  46.  
  47. // performs application initilization stuff
  48. - appDidInit:sender;
  49.  
  50. - infoPanel:sender;
  51.  
  52. // redraws bitmap (recomposites it to the screen).  No region optimization
  53. - drawSelf:(const NXRect *)rects :(int)rectCount;
  54.  
  55. // draws some points in diagonal lines (bogus line drawing routine)
  56. - draw:sender;
  57.  
  58. // erase image to the current background color
  59. - eraseImage:sender;
  60.  
  61. // Look in InterfaceBuilder for the connection to these methods.
  62. // received when a colorwell changes color
  63. - foreWell:sender;
  64. - backWell:sender;
  65.  
  66. // received when a slider changes value
  67. - setFore:sender;
  68. - setBack:sender;
  69.  
  70. // polygron drawing control methods
  71. - startStopPolyDraw:sender;
  72.  
  73. // save/open stuff
  74. - saveCommands:sender;
  75. - openCommands:sender;
  76. - newCommands:sender;
  77.  
  78. // toolHit stuff
  79. - toolHit:sender;
  80. @end
  81.